window.onload = function(){
  let height = window.innerHeight;
  let itemheight = 280
  let items = document.querySelectorAll('.item')
  window.onscroll = function(e){
    var scrolltop = document.documentElement.scrollTop;
    let totalheight = height+scrolltop;
    let containernum = Math.ceil(totalheight/itemheight);
    for(var i = 0;i<items.length;i++ ){
      if(i+1 <=containernum){
        items[i].classList.add('show')
      }else{
        items[i].classList.remove('show')
      }
    }
  }
}